extends Resource
class_name  UnitBase

# 生命值
var base_health_max:float = 0
var ext_health_max:float = 0
var health_max:float:
	get:
		return base_health_max + ext_health_max
var health:float
# 攻击力
var base_attack:float = 0
var ext_attack:float = 0
var attack:
	get:
		return base_attack + ext_attack

# 攻击力百分比
var base_attack_percent:float = 0
var ext_attack_percent:float = 0
var attack_percent:float:
	get:
		return base_attack_percent + ext_attack_percent

# 总攻击力
var total_atack:float:
	get:
		return attack * (1 + attack_percent)

# 防御力
var base_def:float = 0
var ext_def:float = 0
var def:float:
	get:
		return base_def + ext_def

# 防御力百分比
var base_def_percent:float = 0
var ext_def_percent:float = 0
var def_percent:float:
	get:
		return base_def_percent + ext_def_percent
		
# 闪避百分比
var base_dodge:float = 0
var ext_dodge:float = 0
var dodge:
	get:
		return base_dodge + ext_dodge

# 攻击命中
var base_hit_tate:float = 0
var ext_hit_rate:float = 0
var hit_rate:float:
	get:
		return base_hit_tate + ext_hit_rate

# 攻击暴击
var base_attack_crit:float = 0
var ext_attack_crit:float = 0
var attack_crit:float:
	get:
		return base_attack_crit + ext_attack_crit
		
# 攻击暴击伤害
var base_attack_crit_damage_rate:float = 2
var ext_attack_crit_damage_rate:float = 2
var attack_crit_damage_rate:float:
	get:
		return base_attack_crit_damage_rate + ext_attack_crit_damage_rate
		

# 射程
var base_attack_range_min:int = 1
var ext_attack_range_min:int = 1
var attack_range_min:
	get:
		return base_attack_range_min + ext_attack_range_min
var base_attack_range_max:int = 1
var ext_attack_range_max:int = 1
var attack_range_max:
	get:
		return base_attack_range_max + ext_attack_range_max
		
# 行动力 - 白刃战时一回合能行动几次
var base_action_power:int = 1
var ext_action_power:int = 1
var action_power:int:
	get:
		return base_action_power + ext_action_power

